package com.cqq.print.business.dao.impl;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.cqq.print.business.dao.domain.POrder;
import com.cqq.print.business.dao.mapper.POrderMapper;
import com.cqq.print.business.dao.query.POrderQuery;


/**
 * @author generated
 * @date 2015-07-01
 */


@Repository(value="pOrderDao")
public class POrderDaoImpl extends com.cqq.common.core.base.BaseDao implements com.cqq.print.business.dao.POrderDao{

             @Autowired
             private POrderMapper pOrderMapper;

    public int deleteByPrimaryKey(Integer id){
        return pOrderMapper.deleteByPrimaryKey(id);
    }

    public int insertSelective(POrder record){
    	pOrderMapper.insertSelective(record);
        return record.getId();
    }

    public POrder selectByPrimaryKey(Integer id){
        return pOrderMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(POrder record){
        return pOrderMapper.updateByPrimaryKeySelective(record);
    }

	
	public List<POrder> queryOrders(Map<String, Object> map) {
		return pOrderMapper.queryOrders(map);
	}

	
	public int queryOrdersCount(Map<String, Object> map) {
		return pOrderMapper.queryOrdersCount(map);
	}

	
	public POrder queryOrderById(int id) {
		return pOrderMapper.queryOrderById(id);
	}

	
	public POrder queryOrderByorderNum(String orderNum) {
		return pOrderMapper.queryOrderByorderNum(orderNum);
	}

	
	public Map<String,Object> getMaxOrderNumToDay(String currDate) {
		return pOrderMapper.getMaxOrderNumToDay(currDate);
	}

	
	public List<POrder> queryOrdersForDispatch(POrderQuery query) {
		return pOrderMapper.queryOrdersForDispatch(query);
	}

	
	public int queryOrdersCountForDispatch(POrderQuery query) {
		return pOrderMapper.queryOrdersCountForDispatch(query);
	}



}